package com.team.order.service;

import com.team.order.domain.RepairReservation;
import com.team.order.domain.dto.RepairDTO;

import java.util.List;

/**
 * @author 梁国瑞
 * @version 1.0
 */
public interface RepairService {
    // 添加预约记录
    Long addRepair(RepairReservation repairReservation);
    // 修改预约记录
    int updateRepair(RepairReservation repairReservation);
    
    /**
     * 查询维修预约列表
     * @param merchantId 商户ID
     * @param status 状态（可选）
     * @return 预约列表
     */
    List<RepairReservation> getReservationList(Long merchantId, String status);
    
    /**
     * 根据ID获取维修预约详情
     * @param reservationId 预约ID
     * @return 预约详情
     */
    RepairReservation getReservationById(Long reservationId);
    
    /**
     * 验证维修预约记录是否存在且状态正确
     * @param reservationId 预约ID
     * @return 是否有效
     */
    boolean validateReservation(Long reservationId);
    
    /**
     * 更新维修预约状态
     * @param reservationId 预约ID
     * @param status 新状态
     * @return 更新结果
     */
    int updateReservationStatus(Long reservationId, String status);
    
    /**
     * 取消维修预约
     * @param reservationId 预约ID
     * @return 取消结果
     */
    int cancelReservation(Long reservationId);
}
